home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / editor / audid286.lha / AudioED286 / Install < prev    next >
Text File  |  1995-08-27  |  6KB  |  262 lines

  1. ; $VER: AudioED V 2.86 (27.08.95)
  2. ;
  3. ; Installation script for the Commodore Installer (tm)
  4. ;
  5. ; Installs the program AudioED 2.86 by Frank Enderle to your
  6. ; harddisk partition.
  7.  
  8. ; startup message
  9.  
  10. (set old_level @user-level)
  11. (set sys_ver (/ (getversion "exec.library" (resident)) 65536))
  12.  
  13. (if (< sys_ver 37) (
  14.   (abort "AudioED requires at least Kickstart 2.04 !")
  15.   (exit (quiet))
  16. ))
  17.  
  18. (user 1)
  19. (message "This script installs the program\n\nAudioED\nVersion 2.86\n\n"
  20.          "All files contained in this archive are Copyright © 1994-95 by Frank Enderle !" )
  21. (user old_level)
  22.  
  23. ; ask user where to install AudioED
  24.  
  25. (set drawer
  26.   (askdir
  27.     (prompt "Please select the directory where you would like to install "
  28.             "AudioED 2.86\nA drawer called 'AudioED' would be created !")
  29.     (help @askdir-help)
  30.     (default "SYS:")
  31.   )
  32. )
  33.  
  34. (set @default-dest drawer)
  35.  
  36. ; delete old installations
  37.  
  38. (user 1)
  39. (if (exists (tackon drawer "AudioED") (noreq)) (
  40.   (if (askbool
  41.     (prompt "There's already an AudioED-version installed !\n\nDelete it ?\n(NOT REQUIRED FOR UPDATE!)\n")
  42.     (help @askbool-help)) (
  43.     (if (askbool
  44.       (prompt "WARNING: All files in this drawer will be deleted !\n\nContinue ?")
  45.       (help @askbool-help)) (
  46.  
  47.       ; we use DOS commands: Installer is very 'unfriendly' for file deletion !
  48.  
  49.       (run (cat "c:delete >NIL: \"" (tackon drawer "AudioED") "\" \""  (tackon drawer "AudioED.info") "\" all"))
  50.       (run "c:delete >NIL: LOCALE:catalogs/#?/audioed.catalog")
  51.       (run "c:delete >NIL: LIBS:idx.library")
  52.       (run "c:delete >NIL: ENVARC:AudioED#?")
  53.       (run "c:delete >NIL: ENVARC:MUI/AudioED#?")
  54.     ))
  55.   ))
  56.  
  57.   (if (NOT (askbool
  58.     (prompt "Install now AudioED ?")
  59.     (help @askbool-help))) (
  60.     (exit)
  61.   ))
  62. ))
  63. (user old_level)
  64.  
  65. (complete 20)
  66.  
  67. ; install program & keyfile
  68.  
  69. (working "Installing AudioED 2.86 Program")
  70.  
  71. (copyfiles
  72.   (help @copyfiles-help)
  73.   (source "drawer_icon")
  74.   (dest drawer)
  75.   (newname "AudioED.info")
  76. )
  77.  
  78. (set drawer (tackon drawer "AudioED"))
  79. (makedir drawer)
  80.  
  81. (copyfiles
  82.   (help @copyfiles-help)
  83.   (source "AudioED")
  84.   (dest drawer)
  85.   (infos)
  86. )
  87.  
  88. (if (<> (getsum "Keyfile/AudioED.key") $B81AA1DC) (
  89.  
  90.   ; copy keyfile to archive
  91.  
  92.   (copyfiles
  93.     (help @copyfiles-help)
  94.     (source "Keyfile/AudioED.key")
  95.     (dest "ENVARC:")
  96.   )
  97.  
  98.   ; copy keyfile to environment
  99.  
  100.   (copyfiles
  101.     (help @copyfiles-help)
  102.     (source "Keyfile/AudioED.key")
  103.     (dest "ENV:")
  104.   )
  105. ) (
  106.   (user 1)
  107.   (message "Keyfile is missing.\n\n You're running the demoversion !\n\n"
  108.            "On how to register read the documentation.")
  109.   (user old_level)
  110. ))
  111.  
  112. (complete 40)
  113.  
  114. ; install library
  115.  
  116. (working "Installing required libraries")
  117.  
  118. (copylib
  119.   (help @copylib-help)
  120.   (source "libs/idx.library")
  121.   (dest "LIBS:")
  122. )
  123.  
  124. (copylib
  125.   (help @copylib-help)
  126.   (source "libs/iff.library")
  127.   (dest "LIBS:")
  128. )
  129.  
  130. (complete 60)
  131.  
  132. ; install locales (only on > 37)
  133.  
  134. (if (> sys_ver 37) (
  135.   (working "Installing locale files")
  136.  
  137.   (set language (askoptions
  138.     (choices "English" "Deutsch")
  139.     (prompt "Select language-catalogs to install")
  140.     (help @askchoices-help)
  141.   ))
  142.  
  143.   (set ask_language 0)
  144.   (while (< ask_language 2) (
  145.     (set language_name (select ask_language "English" "Deutsch"))
  146.     (if (BITAND language (shiftleft 1 ask_language)) (
  147.       (if (> ask_language 0) (
  148.         (copyfiles
  149.           (help @copyfiles-help)
  150.           (source (tackon (tackon "locale/catalogs" language_name) "audioed.catalog"))
  151.           (dest (tackon "LOCALE:catalogs" language_name))
  152.         )
  153.       ))
  154.     ))
  155.     (set ask_language (+ ask_language 1))
  156.   ))
  157. ))
  158.  
  159. (complete 80)
  160.  
  161. ; install documentation
  162.  
  163. (working "Installing documentation files")
  164.  
  165. (set language (askchoice
  166.   (choices "English documentation" "Deutsche Dokumentation")
  167.   (prompt "Select documentation language to install")
  168.   (help @askchoices-help)
  169. ))
  170.  
  171. (set ask_language 0)
  172. (while (< ask_language 2) (
  173.   (set doc_name (select ask_language "docs/english/AudioED.guide" "docs/deutsch/AudioED.guide"))
  174.   (if (= language ask_language) (
  175.     (copyfiles
  176.       (help @copyfiles-help)
  177.       (source doc_name)
  178.       (dest drawer)
  179.       (infos)
  180.     )
  181.   ))
  182.   (set ask_language (+ ask_language 1))
  183. ))
  184.  
  185. (working "Updating databases")
  186.  
  187. (user 1)
  188. (if (askbool
  189.   (prompt "If you have had already installed an older\n"
  190.           "version you will have to update\n"
  191.           "the database.\n"
  192.           "(Original files are backed up)\n\n"
  193.           "Update older database ?")
  194.   (help @askbool-help)) (
  195.     (set tapes
  196.       (askdir
  197.         (prompt "Select drawer containing databases...")
  198.         (help @askdir-help)
  199.         (default drawer)
  200.       )
  201.     )
  202.  
  203.     (foreach tapes "#?.idx" (
  204.       (set name (substr @each-name 0 (- (strlen @each-name) 4)))
  205.  
  206.  
  207.       (if (<> (substr name (- (strlen name) 4) 4) "_BAK") (
  208.         (rename
  209.           (cat (tackon tapes name) ".idx")
  210.           (cat (tackon tapes name) "_BAK.idx")
  211.         )
  212.  
  213.         (rename
  214.           (cat (tackon tapes name) ".dat")
  215.           (cat (tackon tapes name) "_BAK.dat")
  216.         )
  217.  
  218.         (run (cat "old2new >NIL: \"" (tackon tapes name) "_BAK\" \"" (tackon tapes name) "\" DATABASE" ))
  219.       ))
  220.     ))
  221.   )
  222. )
  223.  
  224. (if (askbool
  225.   (prompt "If you're updating from version 2.5x to 2.86\n"
  226.           "your ENVARC:audioed.resident needs to be updated\n"
  227.           "(Original files are backed up)\n\n"
  228.           "Should I update audioed.resident ?")
  229.   (help @askbool-help)) (
  230.     (rename "ENV:AudioED.resident" "ENV:AudioED_BAK.resident")
  231.     (rename "ENVARC:AudioED.resident" "ENVARC:AudioED_BAK.resident")
  232.     (run "old2new >NIL: ENV:AudioED_BAK.resident ENV:AudioED.resident CONFIG")
  233.     (run "c:copy >NIL: ENV:AudioED.resident ENVARC:AudioED.resident")
  234.   )
  235. )
  236. (user old_level)
  237.  
  238. (complete 90)
  239.  
  240. ; install programmer information
  241.  
  242. (working "Installing developer files")
  243.  
  244. (if (askbool
  245.   (help @askbool-help)
  246.   (prompt "This archive contains the catalog-description file and a "
  247.           "catalog-translation file for german.\n\nShall I install "
  248.           "them ?")) (
  249.     (copyfiles
  250.       (help @copyfiles-help)
  251.       (source "locale/developer")
  252.       (dest (tackon drawer "Developer"))
  253.       (infos)
  254.       (all)
  255.     )
  256.   )
  257. )
  258.  
  259. (complete 100)
  260.  
  261. (exit)
  262.